<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <%= stylesheet_link_tag "site"  %>
   <%= javascript_include_tag :defaults  %>
    <title><%= @title %></title>
  </head>
  <body>
    <div id="container">
      <div id="header">

        <h1><a href="/"><img src="/images/linqr.png" alt="聆客" /><span>首页</span></a></h1>
        <div id="navigation">
          <ul>
            <%if logged_in? -%>
              <li><%= link_to "我的首页", :controller=>"sources" %></li>
              <li><%= link_to "我的空间", :controller=>"bookmarks" %></li>
              <li><%= link_to "导入书签", :controller=>"import", :action=>"select" %></li>
              <li><%= link_to "添加书签", :controller=>"sources", :action=>"new" %></li>
              <li><%= link_to "设置", edit_user_path(current_user) %></li>
              <li><%= link_to "退出", logout_path %></li>
            <%else -%>
              <li><%= link_to "首页", :controller=>"site" %></li>
              <li><%= link_to "登录", login_path %></li>
              <li><%= link_to "注册", signup_path %></li>
            <%end -%>
            <li><%= link_to "随便看看", :controller=>"sources" %></li>
          </ul>
        </div>
      </div>
      <div id="main">
        <div id="content">
          <%= content_tag :p, flash[:notice], :class => "sysmsg" unless flash[:notice].blank? %>
          <p id="headline"><%= @title %></p>

           <%= yield %>

          <%#*<div class="news">%>
            <%#*汶川 8 级地震救灾中，为汶川祈祷…… <a href="/browse/1">&raquo; 查看地震相关消息</a>%>
          <%#*</div>%>


        </div>
      </div>
      <div id="sidebar">
          <%if logged_in? %>
            <div class="sect">
             <h2>欢迎你,<%=current_user.login%></h2>
             <%= image_tag(current_user.image.public_filename, :alt => '', :width=>100, :height=>70) if current_user.image%>
           </div>
          <% else %>
            <div class="sect">
              <h2>登录</h2>
               <% form_tag session_path, {:id=>"login"} do -%>
                <p>
                   <label class="label_input" for="login">用户名：</label>
                   <%= text_field_tag 'login', params[:login], :class=>"input_text"  %>
                </p>
                <p>
                  <label for="password"   class="label_input" >密码:</label>
                  <%= password_field_tag 'password', params[:password], :class=>"input_text"%>
                </p>
                <p>
                  <label for="remember_me" class="label_check">
                  <%= check_box_tag 'remember_me', '1', true, :class => "checkbox" %>
                  下次自动登录
                  </label>
                </p>
                <p div class="act">
                  <%= submit_tag '登录', :class => "formbutton" %>
                </p>
                <p id="forgot">
                  <%= link_to "忘记密码了?", "" %>
                </p>
              <% end -%>

            </div>
            <div class="sect" id="register">
              <h2>还没有账号？</h2>
              <p>
                <%= link_to '<img src="http://static.fanfou.com/img/register.gif" alt="注册" />', signup_path %>
                </p>
            </div>
        <% end %>
        <div class="sect">


          <h2>标签</h2>
          <%= @mytags %>
          <div>
          <%#tags = Tag.tags(:limit => 50, :order => "name desc")%>
          <%# tag_cloud tags, %w(nube1 nube2 nube3 nube4 nube5) do |name, css_class| %>
            <%#= link_to name, {:controller=>:sources, :action=>:tag_with, :tagname => name},:class => css_class %>
          <%# end %>
          </div>
          <ul class="tlist">
            <li><%= link_to "更多标签...", :controller=>:tags %> </li>
          </ul>

        </div>
        <div class="sect">
          <h2>推荐</h2>
          <ul class="alist">
          <li><a href="/betteric" title="eric"><img src="http://avatar.fanfou.com/s0/00/5r/tt.jpg?1192688788" alt="eric" /><span>eric</span></a></li><li><a href="/hongtaiyang" title="hongtaiyang"><img src="http://avatar.fanfou.com/s0/00/3m/yq.jpg?1183621148" alt="hongtaiyang" /><span>hongtaiyang</span></a></li><li><a href="/leoleot" title="leoleo"><img src="http://avatar.fanfou.com/s0/00/5w/yx.jpg?1189091478" alt="leoleo" /><span>leoleo</span></a></li><li><a href="/mercury527" title="重庆陶陶"><img src="http://avatar.fanfou.com/s0/00/59/2s.jpg?1212502679" alt="重庆陶陶" /><span>重庆陶陶</span></a></li><li><a href="/orange" title="橙子"><img src="http://avatar.fanfou.com/s0/00/4e/yr.jpg?1200755356" alt="橙子" /><span>橙子</span></a></li><li><a href="/summert" title="偏执的喜欢"><img src="http://avatar.fanfou.com/s0/00/5k/cx.jpg?1212729993" alt="偏执的喜欢" /><span>偏执的喜欢</span></a></li><li><a href="/vainn" title="顏小睡"><img src="http://avatar.fanfou.com/s0/00/50/hm.jpg?1213066473" alt="顏小睡" /><span>顏小睡</span></a></li><li><a href="/zoe032265" title="沫沫"><img src="http://avatar.fanfou.com/s0/00/4b/t8.jpg?1212151872" alt="沫沫" /><span>沫沫</span></a></li>	</ul>

        </div>
        <div class="sect">
          <h2>饭否新人</h2>
          <ul class="alist">
          <li><a href="/阿哆姆" title="阿哆姆"><img src="http://avatar.fanfou.com/s0/00/73/4s.jpg?1213079924" alt="阿哆姆" /><span>阿哆姆</span></a></li><li><a href="/zxzily.com" title="邹兴壮"><img src="http://avatar.fanfou.com/s0/00/8r/3p.jpg?1213079762" alt="邹兴壮" /><span>邹兴壮</span></a></li><li><a href="/canshel" title="shel"><img src="http://avatar.fanfou.com/s0/00/72/sd.jpg?1213079138" alt="shel" /><span>shel</span></a></li><li><a href="/tianyf" title="小凤儿"><img src="http://avatar.fanfou.com/s0/00/84/rc.jpg?1213079569" alt="小凤儿" /><span>小凤儿</span></a></li><li><a href="/一佉贰拾哖" title="hql0318"><img src="http://avatar.fanfou.com/s0/00/8s/gk.jpg?1213078592" alt="hql0318" /><span>hql0318</span></a></li><li><a href="/安倍小百合" title="安倍小百合"><img src="http://avatar.fanfou.com/s0/00/75/ys.jpg?1213079488" alt="安倍小百合" /><span>安倍小百合</span></a></li><li><a href="/影子111" title="影子"><img src="http://avatar.fanfou.com/s0/00/81/13.jpg?1213078089" alt="影子" /><span>影子</span></a></li><li><a href="/haizhu" title="坏天"><img src="http://avatar.fanfou.com/s0/00/7m/vp.jpg?1213077982" alt="坏天" /><span>坏天</span></a></li>	</ul>

        </div>
      </div>
      <div id="footer">
        <p><a href="http://help.fanfou.com/about.html" target="_blank">关于饭否</a> | <a href="http://del.icio.us/fanfou" target="_blank">媒体报道</a> | <a href="http://dev.fanfou.com" target="_blank">开发日志</a> | <a href="http://help.fanfou.com/api.html" target="_blank">API</a> | <a href="http://help.fanfou.com/faq.html" target="_blank">帮助</a> | <a href="http://help.fanfou.com/privacy.html" target="_blank">隐私声明</a> &copy; <span title="Q:0; S:0; C:12; F:0; T:48.29">2008</span> fanfou.com</p>

        <p>Linqer</p>
      </div>
    </div>

    <div><%= render :partial => 'shared/debug' %></div>

  </body>
</html>
